﻿@model Page<ViewContentAndCate>

@{
    ViewData["Title"] = ViewBag.cateInfo.Name;
    ViewData["Description"] = ViewBag.SiteConfig.Description;
}

<div class="layui-container" style="margin-top:10px;">
    <div class="layui-bg-gray" style="padding:10px;">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-panel" style="text-align:left;padding:10px;">
                    <span class="layui-breadcrumb">
                        <a href="/">Home</a>
                        <a><cite>@ViewBag.cateInfo.Name</cite></a>
                    </span>
                </div>
            </div>
        </div>
    </div>

    <div class="layui-bg-gray" style="padding:10px;">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-panel cxuu-list-list" style="padding:5px;">
                    <ul>
                        @foreach (var item in Model.Items)
                        {
                            <li>
                                <span class="layui-badge-dot layui-bg-blue"></span>
                                <span class="cxuu-list-time">@item.Time.ToString("d")</span>
                                <a asp-area="Home" asp-controller="Info" asp-action="Index" asp-route-id="@item.Id" target="_blank">@item.Title </a>
                            </li>
                        }
                    </ul>
                </div>
            </div>
            <div id="laypage"></div>
        </div>
    </div>
</div>
@section Scripts
    {
<script>
    layui.use(['laypage', 'element', 'layer'], function () {
        var laypage = layui.laypage
            , layer = layui.layer
            , element = layui.element;

        laypage.render({
            elem: 'laypage'
            , count: '@Model.TotalItems'
            , limit: '@ViewBag.cateInfo.Num'
            , groups: '@Model.TotalPages'
            , theme: '#1E9FFF'
            , curr: '@Model.CurrentPage' //获取起始页
            //,hash: '/' //自定义hash值
            , prev: "上一页"
            , next: "下一页"
            , jump: function (obj, first) {
                if (!first) {
                    location.href = '/Home/List/Index/@ViewBag.cateInfo.Id?page=' + obj.curr;
                }
            }
        });
    });
</script>
    }
